home *** CD-ROM | disk | FTP | other *** search
/ Regional Industry Buying Guide: Greater Florida / 2000 Regional Industry Buying Guide - Greater Florida.iso / cs2k / clients / classic / scripts.lib / TELENET.SCR < prev    next >
Encoding:
Text File  |  1998-09-30  |  1.5 KB  |  75 lines

  1. !
  2. !  Copyright (c) 1998
  3. !  by CompuServe Incorporated, Columbus, Ohio
  4. !
  5. !  The information in this software is subject to change without
  6. !  notice and should not be construed as a commitment by CompuServe.
  7. !
  8. !  TELENET:
  9. !       Connect to SprintNet
  10. !       Success:  returns %Success
  11. !       Failure:  saves error msg in %FailureMsg and returns %Failure
  12. !
  13. !+V
  14. ! "4.0.5"
  15. !-V
  16.  
  17. Attempts = 3;
  18. on cancel goto SprintNet_Cancelled;
  19. show "Connecting to SprintNet";
  20. send "@." & %CR;
  21. wait until 1;   ! pause required for 2400 baud
  22. send %CR & %CR;
  23.  
  24. Wait_SprintNet:
  25.     if Attempts = 0 goto SprintNet_Failed;
  26.     Attempts = Attempts - 1;
  27.  
  28.     wait
  29.         "Terminal"      goto send_telenet_id,
  30.         "@"             goto send_telenet_host,
  31.         %mdm_Failure    goto NO_Carrier
  32.     until 85;
  33.  
  34.     send %CR & %CR;
  35.     goto Wait_SprintNet;
  36.  
  37. send_telenet_id:
  38.     send "D1" & %CR;
  39.     goto Wait_SprintNet;
  40.  
  41. send_telenet_host:
  42.     send "C 202202" & %CR;
  43.     goto Wait_HostName;
  44.  
  45. Wait_HostName:
  46.     Tries = 3;
  47.     goto Wait_UserID;
  48.  
  49. Send_ToHostName:
  50.     Tries = Tries - 1;
  51.     send "/HOST" & %CR;
  52.  
  53. Wait_UserID:
  54.     if Tries = 0 goto SprintNet_Failed;
  55.     wait
  56.         %mdm_Failure    goto NO_Carrier,
  57.         "User ID:"      goto Send_ToHostName,
  58.         "Host Name:"    goto Return_Success
  59.     until 25;
  60.     goto Send_ToHostName;
  61.  
  62. Return_Success:
  63.     exit %Success;
  64.  
  65. NO_Carrier:
  66.     define %FailureMsg = "Modem connection lost";
  67.     exit %Failure;
  68.  
  69. SprintNet_Failed:
  70.     define %FailureMsg = "SprintNet: No answer";
  71.     exit %Failure;
  72.     
  73. SprintNet_Cancelled:
  74.     exit %Cancel;
  75.